package model.entity;

import java.util.List;

import model.entity.stats.StatSet;
import model.item.EquippedInventory;
import model.item.Inventory;
import model.map.Direction;
import model.map.Location;
import model.map.MovementType;
import model.resource.AvatarMount;
import utilities.*;

/**
 * 
 * This is a vehicle that an Avatar can mount and have 
 * fun on.
 * 
 *
 */

public class Vehicle extends BrainlessNPC implements Mountable, Archiveable {
	public boolean mounted = false; 
	public Vehicle(String name, Direction direction, Location location, StatSet stats, 
			List<MovementType> movementTypes, Inventory inventory, EquippedInventory equipment){

		super(name, direction, location, stats, 
				movementTypes, inventory, equipment);

	}

	public Vehicle() {
		// TODO Auto-generated constructor stub
	}

	public void mount(Entity e){
		AvatarMount.getInstance().add(e, this);
		e.setLocation(location);
		mounted = true;
	}
	public void unmount(Entity e){
		AvatarMount.getInstance().remove(e);
		mounted = false;
	}
	
	public Archive save() {
		Archive archive = super.save();
		
		return archive;
	}
	
	public void load(Archive archive) {
		super.load(archive);
	}

}

